﻿module Sustainalytics.News {

    import Common = Sustainalytics.Common;

    export interface INewsService {
        addNews(news: NewsDto): ng.IPromise<NewsDto>;
        deleteNews(id: string): ng.IPromise<Object>;
        deleteMultipleNews(newsItems: string[]): ng.IPromise<Object>;
        getNews(newsId: string): ng.IPromise<NewsDto>;
        getNewsFilteredWithOptions(filter: NewsFilter, listOptions: Common.ListOptions): ng.IPromise<any>;
        getNewsFiltered(filter: NewsFilter, skip: number, take: number, orderBy: string[], orderByAsc: boolean): ng.IPromise<NewsDto[]>;
        getNewsPaged(filter: NewsFilter, skip: number, take: number, orderBy: string[], orderByAsc: boolean): ng.IPromise<Common.PagedList<NewsDto>>;
        updateNews(news: NewsDto): ng.IPromise<NewsDto>;
        patchNews(patchData: NewsPatch): ng.IPromise<{}>;
    }
}